import request from '@/utils/request'

/** @name 车位导入 **/
export function importPlaceAPI (data) {
  return request({
    url: '/place/import',
    method: 'post',
    data
  })
}

/** @name 车位列表 **/
export function getPlaceListAPI (params) {
  return request({
    url: '/place/list',
    method: 'get',
    params
  })
}

/** @name 添加车位 **/
export function addPlaceAPI (data) {
  return request({
    url: '/place/add',
    method: 'post',
    data
  })
}

/** @name 编辑车位 **/
export function editPlaceAPI (data) {
  return request({
    url: '/place/edit',
    method: 'post',
    data
  })
}

/** @name 删除车位 **/
export function deletePlaceAPI (data) {
  return request({
    url: '/place/delete',
    method: 'delete',
    data
  })
}

/** @name 设置固定车位 **/
export function fixedPlaceAPI (data) {
  return request({
    url: '/place/fixed',
    method: 'post',
    data
  })
}

/** @name 设置车位是否是空闲 **/
export function idlePlaceAPI (data) {
  return request({
    url: '/place/idle',
    method: 'post',
    data
  })
}

/** @name 简易用户列表 **/
export function getEasyPlaceListAPI () {
  return request({
    url: '/place/easyList',
    method: 'get'
  })
}
